<? $this->title ='Single order'; ?>
{{wrap with="admin_page_layout.phtml" in="content_zone"}}

<? $order = lmbActiveRecord :: findById("Order", (int)$this->request->get('id'), false); ?>

<h2>Items</h2>
{{list using='$order.lines' parity='$parity' as='$line'}}
<table cellpadding="0" cellspacing="0" class='list'>
  <thead>
  <tr>
    <th>Title</th>
    <th>Price</th>
    <th>Quantity</th>
    <th>Summ</th>
  </tr>
  </thead>
  {{list:item}}
  <tr class='{$parity}'>
   <td>{$line.product.title}</td>
   <td>${$line.price|number:2, '.', ' '}</td>
   <td>{$line.quantity}</td>
   <td>${$line.summ|number:2, '.', ' '}</td>
  </tr>
  {{/list:item}}
</table>
{{/list}}

<h2>Order status</h2>
Status : {$order.status_name}<br/>
Address : {$order.address}<br/>

<h2>Set other order status</h2>
{{form id='form_status' name='form_status' method='post'}}
  <?php $statuses = Order :: getStatusOptions(); ?>
  Status : {{select id='status' name='status' options="$statuses"}}{{option value='0' prepend='true'}}--------{{/option}}{{/select}}
<br/>
<input type='submit' class='button' name='set_status' value="Set new status" class='button'/><br/>
{{/form}}


<h2>Customer</h2>
Name : {$order.user.name}<br/>
Email : <a href='mailto:{$order.user.email}'>{$order.user.email}</a><br/>
Login : {$order.user.login}<br/>

{{/wrap}}
